var express = require('express');
var router = express.Router();
var comData=require('../models/comData');
/* GET home page. */
router.get('/',comData.catData,comData.newData,function(req, res, next) {
   //文章列表
    Model('article').find({}).sort({addtime:-1}).limit(8).populate('user_id').exec(function(err,data){
              res.render('index/index',{title:'首页',data:data});
    });
});

module.exports = router;
